<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.14"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>ESP32VGA: FabGL::CanvasClass Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">ESP32VGA
   </div>
   <div id="projectbrief">ESP32 VGA Controller and Graphics Library</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.14 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><b>FabGL</b></li><li class="navelem"><a class="el" href="class_fab_g_l_1_1_canvas_class.html">CanvasClass</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-static-methods">Static Public Member Functions</a> &#124;
<a href="class_fab_g_l_1_1_canvas_class-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">FabGL::CanvasClass Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>A class with a set of drawing methods.  
 <a href="class_fab_g_l_1_1_canvas_class.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="canvas_8h_source.html">canvas.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:ac056601ea100d7bbc7542e925bb60e5e"><td class="memItemLeft" align="right" valign="top"><a id="ac056601ea100d7bbc7542e925bb60e5e"></a>
uint16_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_fab_g_l_1_1_canvas_class.html#ac056601ea100d7bbc7542e925bb60e5e">getWidth</a> ()</td></tr>
<tr class="memdesc:ac056601ea100d7bbc7542e925bb60e5e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return the canvas width in pixels. This is equivalent to VGA Controller viewport width. <br /></td></tr>
<tr class="separator:ac056601ea100d7bbc7542e925bb60e5e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a067ea5544dbe2aaf665002932a2f64f0"><td class="memItemLeft" align="right" valign="top"><a id="a067ea5544dbe2aaf665002932a2f64f0"></a>
uint16_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_fab_g_l_1_1_canvas_class.html#a067ea5544dbe2aaf665002932a2f64f0">getHeight</a> ()</td></tr>
<tr class="memdesc:a067ea5544dbe2aaf665002932a2f64f0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return the canvas height in pixels. This is equivalent to VGA Controller viewport height. <br /></td></tr>
<tr class="separator:a067ea5544dbe2aaf665002932a2f64f0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8500b3be81a68712d7b3fcf4c9c95ca9"><td class="memItemLeft" align="right" valign="top"><a id="a8500b3be81a68712d7b3fcf4c9c95ca9"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_fab_g_l_1_1_canvas_class.html#a8500b3be81a68712d7b3fcf4c9c95ca9">clear</a> ()</td></tr>
<tr class="memdesc:a8500b3be81a68712d7b3fcf4c9c95ca9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Fill the entire canvas with the brush color. <br /></td></tr>
<tr class="separator:a8500b3be81a68712d7b3fcf4c9c95ca9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a243d7583d6e3f99d11a6252195554cac"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_fab_g_l_1_1_canvas_class.html#a243d7583d6e3f99d11a6252195554cac">setScrollingRegion</a> (int16_t X1, int16_t Y1, int16_t X2, int16_t Y2)</td></tr>
<tr class="memdesc:a243d7583d6e3f99d11a6252195554cac"><td class="mdescLeft">&#160;</td><td class="mdescRight">Define the scrolling region.  <a href="#a243d7583d6e3f99d11a6252195554cac">More...</a><br /></td></tr>
<tr class="separator:a243d7583d6e3f99d11a6252195554cac"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a58495dbcb8ff4b7185309e2f06795b39"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_fab_g_l_1_1_canvas_class.html#a58495dbcb8ff4b7185309e2f06795b39">scroll</a> (int16_t offsetX, int16_t offsetY)</td></tr>
<tr class="memdesc:a58495dbcb8ff4b7185309e2f06795b39"><td class="mdescLeft">&#160;</td><td class="mdescRight">Scroll pixels horizontally and/or vertically.  <a href="#a58495dbcb8ff4b7185309e2f06795b39">More...</a><br /></td></tr>
<tr class="separator:a58495dbcb8ff4b7185309e2f06795b39"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a782ffad248346c291478a86cdfd86041"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_fab_g_l_1_1_canvas_class.html#a782ffad248346c291478a86cdfd86041">moveTo</a> (int16_t X, int16_t Y)</td></tr>
<tr class="memdesc:a782ffad248346c291478a86cdfd86041"><td class="mdescLeft">&#160;</td><td class="mdescRight">Move current pen position to the spcified coordinates.  <a href="#a782ffad248346c291478a86cdfd86041">More...</a><br /></td></tr>
<tr class="separator:a782ffad248346c291478a86cdfd86041"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a506c308cf3656f6d391c092f8668f315"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_fab_g_l_1_1_canvas_class.html#a506c308cf3656f6d391c092f8668f315">setPenColor</a> (uint8_t red, uint8_t green, uint8_t blue)</td></tr>
<tr class="memdesc:a506c308cf3656f6d391c092f8668f315"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set pen (foreground) color specifying color components.  <a href="#a506c308cf3656f6d391c092f8668f315">More...</a><br /></td></tr>
<tr class="separator:a506c308cf3656f6d391c092f8668f315"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aadbfa1ad000d7d3a892a4dd06ec8ff2e"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_fab_g_l_1_1_canvas_class.html#aadbfa1ad000d7d3a892a4dd06ec8ff2e">setPenColor</a> (<a class="el" href="vgacontroller_8h.html#ab329a30a424ffbdadd1871763dd5b433">Color</a> color)</td></tr>
<tr class="memdesc:aadbfa1ad000d7d3a892a4dd06ec8ff2e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set pen (foreground) color using a color name.  <a href="#aadbfa1ad000d7d3a892a4dd06ec8ff2e">More...</a><br /></td></tr>
<tr class="separator:aadbfa1ad000d7d3a892a4dd06ec8ff2e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afe1b8bca86bc7f428620fae179a0aeb5"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_fab_g_l_1_1_canvas_class.html#afe1b8bca86bc7f428620fae179a0aeb5">setBrushColor</a> (uint8_t red, uint8_t green, uint8_t blue)</td></tr>
<tr class="memdesc:afe1b8bca86bc7f428620fae179a0aeb5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set brush (background) color specifying color components.  <a href="#afe1b8bca86bc7f428620fae179a0aeb5">More...</a><br /></td></tr>
<tr class="separator:afe1b8bca86bc7f428620fae179a0aeb5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1b119b7d930c5b522b2f5a6794b63a94"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_fab_g_l_1_1_canvas_class.html#a1b119b7d930c5b522b2f5a6794b63a94">setBrushColor</a> (<a class="el" href="vgacontroller_8h.html#ab329a30a424ffbdadd1871763dd5b433">Color</a> color)</td></tr>
<tr class="memdesc:a1b119b7d930c5b522b2f5a6794b63a94"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set brush (background) color using a color name.  <a href="#a1b119b7d930c5b522b2f5a6794b63a94">More...</a><br /></td></tr>
<tr class="separator:a1b119b7d930c5b522b2f5a6794b63a94"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a831a796c3e9c0acd15d572ef645b1b89"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_fab_g_l_1_1_canvas_class.html#a831a796c3e9c0acd15d572ef645b1b89">setPixel</a> (int16_t X, int16_t Y)</td></tr>
<tr class="memdesc:a831a796c3e9c0acd15d572ef645b1b89"><td class="mdescLeft">&#160;</td><td class="mdescRight">Fill a single pixel with the pen color.  <a href="#a831a796c3e9c0acd15d572ef645b1b89">More...</a><br /></td></tr>
<tr class="separator:a831a796c3e9c0acd15d572ef645b1b89"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a729fbb7cdc63e4a3445580a4cad44abf"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_fab_g_l_1_1_canvas_class.html#a729fbb7cdc63e4a3445580a4cad44abf">lineTo</a> (int16_t X, int16_t Y)</td></tr>
<tr class="memdesc:a729fbb7cdc63e4a3445580a4cad44abf"><td class="mdescLeft">&#160;</td><td class="mdescRight">Draw a line starting from current pen position.  <a href="#a729fbb7cdc63e4a3445580a4cad44abf">More...</a><br /></td></tr>
<tr class="separator:a729fbb7cdc63e4a3445580a4cad44abf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a144a46fa3b79defc4fba3daf8e49284a"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_fab_g_l_1_1_canvas_class.html#a144a46fa3b79defc4fba3daf8e49284a">drawLine</a> (int16_t X1, int16_t Y1, int16_t X2, int16_t Y2)</td></tr>
<tr class="memdesc:a144a46fa3b79defc4fba3daf8e49284a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Draw a line specifying initial and ending coordinates.  <a href="#a144a46fa3b79defc4fba3daf8e49284a">More...</a><br /></td></tr>
<tr class="separator:a144a46fa3b79defc4fba3daf8e49284a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac5abc63acc5284920edf1b48a346d234"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_fab_g_l_1_1_canvas_class.html#ac5abc63acc5284920edf1b48a346d234">drawRectangle</a> (int16_t X1, int16_t Y1, int16_t X2, int16_t Y2)</td></tr>
<tr class="memdesc:ac5abc63acc5284920edf1b48a346d234"><td class="mdescLeft">&#160;</td><td class="mdescRight">Draw a rectangle using the current pen color.  <a href="#ac5abc63acc5284920edf1b48a346d234">More...</a><br /></td></tr>
<tr class="separator:ac5abc63acc5284920edf1b48a346d234"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a65a0a7a63be0119bb487899fdeb09d50"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_fab_g_l_1_1_canvas_class.html#a65a0a7a63be0119bb487899fdeb09d50">fillRectangle</a> (int16_t X1, int16_t Y1, int16_t X2, int16_t Y2)</td></tr>
<tr class="memdesc:a65a0a7a63be0119bb487899fdeb09d50"><td class="mdescLeft">&#160;</td><td class="mdescRight">Fill a rectangle using the current brush color.  <a href="#a65a0a7a63be0119bb487899fdeb09d50">More...</a><br /></td></tr>
<tr class="separator:a65a0a7a63be0119bb487899fdeb09d50"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:addc92ca7063db1be6c3298d3ba82f649"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_fab_g_l_1_1_canvas_class.html#addc92ca7063db1be6c3298d3ba82f649">swapRectangle</a> (int16_t X1, int16_t Y1, int16_t X2, int16_t Y2)</td></tr>
<tr class="memdesc:addc92ca7063db1be6c3298d3ba82f649"><td class="mdescLeft">&#160;</td><td class="mdescRight">Swap pen and brush colors of the specified rectangle.  <a href="#addc92ca7063db1be6c3298d3ba82f649">More...</a><br /></td></tr>
<tr class="separator:addc92ca7063db1be6c3298d3ba82f649"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4974d43b68cd921fdaa31113450639ae"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_fab_g_l_1_1_canvas_class.html#a4974d43b68cd921fdaa31113450639ae">drawEllipse</a> (int16_t X, int16_t Y, uint16_t width, uint16_t height)</td></tr>
<tr class="memdesc:a4974d43b68cd921fdaa31113450639ae"><td class="mdescLeft">&#160;</td><td class="mdescRight">Draw an ellipse specifying center and size, using current pen color.  <a href="#a4974d43b68cd921fdaa31113450639ae">More...</a><br /></td></tr>
<tr class="separator:a4974d43b68cd921fdaa31113450639ae"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a75353d50b54bb7e81c609daf1554724d"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_fab_g_l_1_1_canvas_class.html#a75353d50b54bb7e81c609daf1554724d">fillEllipse</a> (int16_t X, int16_t Y, uint16_t width, uint16_t height)</td></tr>
<tr class="memdesc:a75353d50b54bb7e81c609daf1554724d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Fill an ellipse specifying center and size, using current brush color.  <a href="#a75353d50b54bb7e81c609daf1554724d">More...</a><br /></td></tr>
<tr class="separator:a75353d50b54bb7e81c609daf1554724d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6ebb36f7b6fd5e9f114d999371838e62"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_fab_g_l_1_1_canvas_class.html#a6ebb36f7b6fd5e9f114d999371838e62">waitCompletion</a> (bool waitVSync=true)</td></tr>
<tr class="memdesc:a6ebb36f7b6fd5e9f114d999371838e62"><td class="mdescLeft">&#160;</td><td class="mdescRight">Wait for drawing queue to become empty.  <a href="#a6ebb36f7b6fd5e9f114d999371838e62">More...</a><br /></td></tr>
<tr class="separator:a6ebb36f7b6fd5e9f114d999371838e62"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a71dcaae67c60c8ba430640b379d81972"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_fab_g_l_1_1_canvas_class.html#a71dcaae67c60c8ba430640b379d81972">drawGlyph</a> (int16_t X, int16_t Y, uint16_t width, uint16_t height, uint8_t const *data, uint16_t index=0)</td></tr>
<tr class="memdesc:a71dcaae67c60c8ba430640b379d81972"><td class="mdescLeft">&#160;</td><td class="mdescRight">Draw a glyph at specified position.  <a href="#a71dcaae67c60c8ba430640b379d81972">More...</a><br /></td></tr>
<tr class="separator:a71dcaae67c60c8ba430640b379d81972"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac715fb40234f0ce6ece586475db0236e"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_fab_g_l_1_1_canvas_class.html#ac715fb40234f0ce6ece586475db0236e">setGlyphOptions</a> (<a class="el" href="union_fab_g_l_1_1_glyph_options.html">GlyphOptions</a> options)</td></tr>
<tr class="memdesc:ac715fb40234f0ce6ece586475db0236e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set drawing options for the next glyphs.  <a href="#ac715fb40234f0ce6ece586475db0236e">More...</a><br /></td></tr>
<tr class="separator:ac715fb40234f0ce6ece586475db0236e"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-methods"></a>
Static Public Member Functions</h2></td></tr>
<tr class="memitem:aeb57335c41fc6f0e1223aca8ceda4eb2"><td class="memItemLeft" align="right" valign="top">static FontInfo const  *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_fab_g_l_1_1_canvas_class.html#aeb57335c41fc6f0e1223aca8ceda4eb2">getPresetFontInfo</a> (int columns, int rows)</td></tr>
<tr class="memdesc:aeb57335c41fc6f0e1223aca8ceda4eb2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the font info that best fits the specified number of columns and rows.  <a href="#aeb57335c41fc6f0e1223aca8ceda4eb2">More...</a><br /></td></tr>
<tr class="separator:aeb57335c41fc6f0e1223aca8ceda4eb2"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>A class with a set of drawing methods. </p>
<p>This class interfaces directly to the VGA controller and provides a set of primitives to paint lines, circles, etc. and to scroll regions, copy rectangles and draw glyphs. Origins are at top left, starting from (0, 0) up to (Canvas Width - 1, Canvas Height - 1).</p>
<p>Example: </p><pre class="fragment">// Setup pins and resolution (5 GPIOs hence we have up to 8 colors)
VGAController.begin(GPIO_NUM_22, GPIO_NUM_21, GPIO_NUM_19, GPIO_NUM_18, GPIO_NUM_5);
VGAController.setResolution(VGA_640x350_70Hz);

// Paint a green rectangle with red border
Canvas.setPenColor(Color::BrightRed);
Canvas.setBrushColor(Color::BrightGreen);
Canvas.fillRectangle(0, 0, Canvas.getWidth() - 1, Canvas.getHeight() - 1);
Canvas.drawRectangle(0, 0, Canvas.getWidth() - 1, Canvas.getHeight() - 1);</pre> </div><h2 class="groupheader">Member Function Documentation</h2>
<a id="a4974d43b68cd921fdaa31113450639ae"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4974d43b68cd921fdaa31113450639ae">&#9670;&nbsp;</a></span>drawEllipse()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void FabGL::CanvasClass::drawEllipse </td>
          <td>(</td>
          <td class="paramtype">int16_t&#160;</td>
          <td class="paramname"><em>X</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int16_t&#160;</td>
          <td class="paramname"><em>Y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint16_t&#160;</td>
          <td class="paramname"><em>width</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint16_t&#160;</td>
          <td class="paramname"><em>height</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Draw an ellipse specifying center and size, using current pen color. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">X</td><td>Horizontal coordinate of the ellipse center. </td></tr>
    <tr><td class="paramname">Y</td><td>Vertical coordinate of the ellipse center. </td></tr>
    <tr><td class="paramname">width</td><td>Ellipse width. </td></tr>
    <tr><td class="paramname">height</td><td>Ellipse height.</td></tr>
  </table>
  </dd>
</dl>
<p>Example: </p><pre class="fragment">// Paint a yellow ellipse
Canvas.setPenColor(Color::BrightYellow);
Canvas.drawEllipse(100, 100, 40, 40);</pre> 
</div>
</div>
<a id="a71dcaae67c60c8ba430640b379d81972"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a71dcaae67c60c8ba430640b379d81972">&#9670;&nbsp;</a></span>drawGlyph()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void FabGL::CanvasClass::drawGlyph </td>
          <td>(</td>
          <td class="paramtype">int16_t&#160;</td>
          <td class="paramname"><em>X</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int16_t&#160;</td>
          <td class="paramname"><em>Y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint16_t&#160;</td>
          <td class="paramname"><em>width</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint16_t&#160;</td>
          <td class="paramname"><em>height</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t const *&#160;</td>
          <td class="paramname"><em>data</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint16_t&#160;</td>
          <td class="paramname"><em>index</em> = <code>0</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Draw a glyph at specified position. </p>
<p><a class="el" href="struct_fab_g_l_1_1_glyph.html" title="Represents a glyph position, size and binary data. ">Glyph</a> is a bitmap (1 bit per pixel) that can be painted using pen (foreground) and brush (background) colors. Various drawing options can be set using <a class="el" href="class_fab_g_l_1_1_canvas_class.html#ac715fb40234f0ce6ece586475db0236e" title="Set drawing options for the next glyphs. ">CanvasClass.setGlyphOptions()</a> method. Glyphs are used by <a class="el" href="class_fab_g_l_1_1_terminal_class.html" title="An ANSI-VT100 compatible display terminal. ">TerminalClass</a> to render characters.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">X</td><td>Horizontal coordinate where to draw the glyph. </td></tr>
    <tr><td class="paramname">Y</td><td>Vertical coordinate where to draw the glyph. </td></tr>
    <tr><td class="paramname">width</td><td>Horizontal size of the glyph. </td></tr>
    <tr><td class="paramname">height</td><td>Vertical size of the glyph. </td></tr>
    <tr><td class="paramname">data</td><td>Memory buffer containing the glyph. Each line is byte aligned. The size must be "(width + 7) / 8 * height" (integer division!). </td></tr>
    <tr><td class="paramname">index</td><td>Optional index inside data. Use when the buffer contains multiple glyphs.</td></tr>
  </table>
  </dd>
</dl>
<p>Example: </p><pre class="fragment">// draw an 'A' using the predefined font to fit 80x25 screen text
Canvas.setPenColor(Color::BrightGreen);
const FabGL::FontInfo * f = Canvas.getPresetFontInfo(80, 25);
Canvas.drawGlyph(0, 0, f-&gt;width, f-&gt;height, f-&gt;data, 0x41);

// draw a 12x8 sprite
const uint8_t enemy[] = {
  0x0f, 0x00, 0x7f, 0xe0, 0xff, 0xf0, 0xe6, 0x70, 0xff,
  0xf0, 0x39, 0xc0, 0x66, 0x60, 0x30, 0xc0,
};
Canvas.setPenColor(Color::BrightYellow);
Canvas.drawGlyph(50, 80, 12, 8, enemy);</pre> 
</div>
</div>
<a id="a144a46fa3b79defc4fba3daf8e49284a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a144a46fa3b79defc4fba3daf8e49284a">&#9670;&nbsp;</a></span>drawLine()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void FabGL::CanvasClass::drawLine </td>
          <td>(</td>
          <td class="paramtype">int16_t&#160;</td>
          <td class="paramname"><em>X1</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int16_t&#160;</td>
          <td class="paramname"><em>Y1</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int16_t&#160;</td>
          <td class="paramname"><em>X2</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int16_t&#160;</td>
          <td class="paramname"><em>Y2</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Draw a line specifying initial and ending coordinates. </p>
<p>The line has the current pen color.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">X1</td><td>Starting horizontal coordinate. </td></tr>
    <tr><td class="paramname">Y1</td><td>Starting vertical coordinate. </td></tr>
    <tr><td class="paramname">X2</td><td>Ending horizontal coordinate. </td></tr>
    <tr><td class="paramname">Y2</td><td>Ending vertical coordinate.</td></tr>
  </table>
  </dd>
</dl>
<p>Example: </p><pre class="fragment">// Paint a blue X over the whole canvas
Canvas.setPenColor(Color::BrightBlue);
Canvas.drawLine(0, 0, Canvas.getWidth() - 1, Canvas.getHeight() - 1);
Canvas.drawLine(Canvas.getWidth() - 1, 0, 0, Canvas.getHeight() - 1);</pre> 
</div>
</div>
<a id="ac5abc63acc5284920edf1b48a346d234"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac5abc63acc5284920edf1b48a346d234">&#9670;&nbsp;</a></span>drawRectangle()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void FabGL::CanvasClass::drawRectangle </td>
          <td>(</td>
          <td class="paramtype">int16_t&#160;</td>
          <td class="paramname"><em>X1</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int16_t&#160;</td>
          <td class="paramname"><em>Y1</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int16_t&#160;</td>
          <td class="paramname"><em>X2</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int16_t&#160;</td>
          <td class="paramname"><em>Y2</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Draw a rectangle using the current pen color. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">X1</td><td>Top left horizontal coordinate. </td></tr>
    <tr><td class="paramname">Y1</td><td>Top left vertical coordiante. </td></tr>
    <tr><td class="paramname">X2</td><td>Bottom right horizontal coordinate. </td></tr>
    <tr><td class="paramname">Y2</td><td>Bottom right vertical coordiante.</td></tr>
  </table>
  </dd>
</dl>
<p>Example: </p><pre class="fragment">// Paint a yellow rectangle
Canvas.setPenColor(Color::BrightYellow);
Canvas.drawRectangle(10, 10, 100, 100);</pre> 
</div>
</div>
<a id="a75353d50b54bb7e81c609daf1554724d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a75353d50b54bb7e81c609daf1554724d">&#9670;&nbsp;</a></span>fillEllipse()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void FabGL::CanvasClass::fillEllipse </td>
          <td>(</td>
          <td class="paramtype">int16_t&#160;</td>
          <td class="paramname"><em>X</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int16_t&#160;</td>
          <td class="paramname"><em>Y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint16_t&#160;</td>
          <td class="paramname"><em>width</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint16_t&#160;</td>
          <td class="paramname"><em>height</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Fill an ellipse specifying center and size, using current brush color. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">X</td><td>Horizontal coordinate of the ellipse center. </td></tr>
    <tr><td class="paramname">Y</td><td>Vertical coordinate of the ellipse center. </td></tr>
    <tr><td class="paramname">width</td><td>Ellipse width. </td></tr>
    <tr><td class="paramname">height</td><td>Ellipse height.</td></tr>
  </table>
  </dd>
</dl>
<p>Example: </p><pre class="fragment">// Paint a filled yellow ellipse
Canvas.setBrushColor(Color::BrightYellow);
Canvas.fillEllipse(100, 100, 40, 40);

// Paint a yellow ellipse with blue border
Canvas.setPenColor(Color::BrightBlue);
Canvas.setBrushColor(Color::BrightYellow);
Canvas.fillEllipse(100, 100, 40, 40);
Canvas.drawEllipse(100, 100, 40, 40);</pre> 
</div>
</div>
<a id="a65a0a7a63be0119bb487899fdeb09d50"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a65a0a7a63be0119bb487899fdeb09d50">&#9670;&nbsp;</a></span>fillRectangle()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void FabGL::CanvasClass::fillRectangle </td>
          <td>(</td>
          <td class="paramtype">int16_t&#160;</td>
          <td class="paramname"><em>X1</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int16_t&#160;</td>
          <td class="paramname"><em>Y1</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int16_t&#160;</td>
          <td class="paramname"><em>X2</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int16_t&#160;</td>
          <td class="paramname"><em>Y2</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Fill a rectangle using the current brush color. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">X1</td><td>Top left horizontal coordinate. </td></tr>
    <tr><td class="paramname">Y1</td><td>Top left vertical coordiante. </td></tr>
    <tr><td class="paramname">X2</td><td>Bottom right horizontal coordinate. </td></tr>
    <tr><td class="paramname">Y2</td><td>Bottom right vertical coordiante.</td></tr>
  </table>
  </dd>
</dl>
<p>Example: </p><pre class="fragment">// Paint a filled yellow rectangle
Canvas.setBrushColor(Color::BrightYellow);
Canvas.fillRectangle(10, 10, 100, 100);

// Paint a yellow rectangle with blue border
Canvas.setPenColor(Color::BrightBlue);
Canvas.setBrushColor(Color::BrightYellow);
Canvas.fillRectangle(10, 10, 100, 100);
Canvas.drawRectangle(10, 10, 100, 100);</pre> 
</div>
</div>
<a id="aeb57335c41fc6f0e1223aca8ceda4eb2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aeb57335c41fc6f0e1223aca8ceda4eb2">&#9670;&nbsp;</a></span>getPresetFontInfo()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">FontInfo const  * FabGL::CanvasClass::getPresetFontInfo </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>columns</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>rows</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Get the font info that best fits the specified number of columns and rows. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">columns</td><td>Minimum number of required columns. </td></tr>
    <tr><td class="paramname">rows</td><td>Minimum number of required rows. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The font info of the preset font. </dd></dl>

</div>
</div>
<a id="a729fbb7cdc63e4a3445580a4cad44abf"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a729fbb7cdc63e4a3445580a4cad44abf">&#9670;&nbsp;</a></span>lineTo()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void FabGL::CanvasClass::lineTo </td>
          <td>(</td>
          <td class="paramtype">int16_t&#160;</td>
          <td class="paramname"><em>X</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int16_t&#160;</td>
          <td class="paramname"><em>Y</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Draw a line starting from current pen position. </p>
<p>Starting pen position is specified using <a class="el" href="class_fab_g_l_1_1_canvas_class.html#a782ffad248346c291478a86cdfd86041" title="Move current pen position to the spcified coordinates. ">CanvasClass.moveTo()</a> method or from ending position of the last call to <a class="el" href="class_fab_g_l_1_1_canvas_class.html#a729fbb7cdc63e4a3445580a4cad44abf" title="Draw a line starting from current pen position. ">CanvasClass.lineTo()</a>. The line has the current pen color.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">X</td><td>Horizontal ending line position. </td></tr>
    <tr><td class="paramname">Y</td><td>Vertical ending line position.</td></tr>
  </table>
  </dd>
</dl>
<p>Example: </p><pre class="fragment">// Paint white a triangle
Canvas.setPenColor(Color::BrightWhite);
Canvas.moveTo(10, 12);
Canvas.lineTo(30, 40);
Canvas.lineTo(10, 12);</pre> 
</div>
</div>
<a id="a782ffad248346c291478a86cdfd86041"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a782ffad248346c291478a86cdfd86041">&#9670;&nbsp;</a></span>moveTo()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void FabGL::CanvasClass::moveTo </td>
          <td>(</td>
          <td class="paramtype">int16_t&#160;</td>
          <td class="paramname"><em>X</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int16_t&#160;</td>
          <td class="paramname"><em>Y</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Move current pen position to the spcified coordinates. </p>
<p>Some methods expect initial pen position to be specified, like Canvas.lineTo().</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">X</td><td>Horizontal pen position. </td></tr>
    <tr><td class="paramname">Y</td><td>Vertical pen position.</td></tr>
  </table>
  </dd>
</dl>
<p>Example: </p><pre class="fragment">// Paint a triangle
Canvas.moveTo(10, 12);
Canvas.lineTo(30, 40);
Canvas.lineTo(10, 12);</pre> 
</div>
</div>
<a id="a58495dbcb8ff4b7185309e2f06795b39"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a58495dbcb8ff4b7185309e2f06795b39">&#9670;&nbsp;</a></span>scroll()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void FabGL::CanvasClass::scroll </td>
          <td>(</td>
          <td class="paramtype">int16_t&#160;</td>
          <td class="paramname"><em>offsetX</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int16_t&#160;</td>
          <td class="paramname"><em>offsetY</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Scroll pixels horizontally and/or vertically. </p>
<p>Scrolling occurs inside the scrolling region defined by <a class="el" href="class_fab_g_l_1_1_canvas_class.html#a243d7583d6e3f99d11a6252195554cac" title="Define the scrolling region. ">CanvasClass.setScrollingRegion()</a>. Vertical scroll is done moving line pointers, so it is very fast to perform. Horizontal scroll is done moving pixel by pixel (CPU intensive task).</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">offsetX</td><td>Number of pixels to scroll left (offsetX &lt; 0) or right (offsetX &gt; 0). </td></tr>
    <tr><td class="paramname">offsetY</td><td>Number of pixels to scroll up (offsetY &lt; 0) or down (offsetY &gt; 0). </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="afe1b8bca86bc7f428620fae179a0aeb5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#afe1b8bca86bc7f428620fae179a0aeb5">&#9670;&nbsp;</a></span>setBrushColor() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void FabGL::CanvasClass::setBrushColor </td>
          <td>(</td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>red</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>green</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>blue</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Set brush (background) color specifying color components. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">red</td><td>Red color component. Minimum value is 0, maximum value is 1 with 8 colors and 3 with 64 colors. </td></tr>
    <tr><td class="paramname">green</td><td>Green color component. Minimum value is 0, maximum value is 1 with 8 colors and 3 with 64 colors. </td></tr>
    <tr><td class="paramname">blue</td><td>Blue color component. Minimum value is 0, maximum value is 1 with 8 colors and 3 with 64 colors.</td></tr>
  </table>
  </dd>
</dl>
<p>Example: </p><pre class="fragment">// Set blue brush with 8 colors setup
Canvas.setBrushColor(0, 0, 1);

// Set blue brush with 64 colors setup
Canvas.setBrushColor(0, 0, 3);</pre> 
</div>
</div>
<a id="a1b119b7d930c5b522b2f5a6794b63a94"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1b119b7d930c5b522b2f5a6794b63a94">&#9670;&nbsp;</a></span>setBrushColor() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void FabGL::CanvasClass::setBrushColor </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="vgacontroller_8h.html#ab329a30a424ffbdadd1871763dd5b433">Color</a>&#160;</td>
          <td class="paramname"><em>color</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Set brush (background) color using a color name. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">color</td><td>The color name.</td></tr>
  </table>
  </dd>
</dl>
<p>Example: </p><pre class="fragment"> // Set blue brush
 Canvas.setBrushColor(Color::BrightBlue);</pre> 
</div>
</div>
<a id="ac715fb40234f0ce6ece586475db0236e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac715fb40234f0ce6ece586475db0236e">&#9670;&nbsp;</a></span>setGlyphOptions()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void FabGL::CanvasClass::setGlyphOptions </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="union_fab_g_l_1_1_glyph_options.html">GlyphOptions</a>&#160;</td>
          <td class="paramname"><em>options</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Set drawing options for the next glyphs. </p>
<p>Setting glyph options allows to slightly change how a glyph is rendered, applying effects like Bold, Italic, Inversion, double width or height and so on. Because <a class="el" href="class_fab_g_l_1_1_canvas_class.html" title="A class with a set of drawing methods. ">FabGL::CanvasClass</a> draws text using glyphs these options affects also how text is rendered.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">options</td><td>A bit field to specify multiple options</td></tr>
  </table>
  </dd>
</dl>
<p>Example: </p><pre class="fragment">// Draw "Hello World!"
Canvas.setGlyphOptions(GlyphOptions().FillBackground(true).DoubleWidth(1));
Canvas.drawText(20, 20, "Hello World!");</pre> 
</div>
</div>
<a id="a506c308cf3656f6d391c092f8668f315"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a506c308cf3656f6d391c092f8668f315">&#9670;&nbsp;</a></span>setPenColor() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void FabGL::CanvasClass::setPenColor </td>
          <td>(</td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>red</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>green</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>blue</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Set pen (foreground) color specifying color components. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">red</td><td>Red color component. Minimum value is 0, maximum value is 1 with 8 colors and 3 with 64 colors. </td></tr>
    <tr><td class="paramname">green</td><td>Green color component. Minimum value is 0, maximum value is 1 with 8 colors and 3 with 64 colors. </td></tr>
    <tr><td class="paramname">blue</td><td>Blue color component. Minimum value is 0, maximum value is 1 with 8 colors and 3 with 64 colors.</td></tr>
  </table>
  </dd>
</dl>
<p>Example: </p><pre class="fragment">// Set white pen with 8 colors setup
Canvas.setPenColor(1, 1, 1);

// Set white pen with 64 colors setup
Canvas.setPenColor(3, 3, 3);</pre> 
</div>
</div>
<a id="aadbfa1ad000d7d3a892a4dd06ec8ff2e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aadbfa1ad000d7d3a892a4dd06ec8ff2e">&#9670;&nbsp;</a></span>setPenColor() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void FabGL::CanvasClass::setPenColor </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="vgacontroller_8h.html#ab329a30a424ffbdadd1871763dd5b433">Color</a>&#160;</td>
          <td class="paramname"><em>color</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Set pen (foreground) color using a color name. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">color</td><td>Color name.</td></tr>
  </table>
  </dd>
</dl>
<p>Example: </p><pre class="fragment"> // Set white pen
 Canvas.setPenColor(Color::BrightWhite);</pre> 
</div>
</div>
<a id="a831a796c3e9c0acd15d572ef645b1b89"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a831a796c3e9c0acd15d572ef645b1b89">&#9670;&nbsp;</a></span>setPixel()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void FabGL::CanvasClass::setPixel </td>
          <td>(</td>
          <td class="paramtype">int16_t&#160;</td>
          <td class="paramname"><em>X</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int16_t&#160;</td>
          <td class="paramname"><em>Y</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Fill a single pixel with the pen color. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">X</td><td>Horizontal pixel position. </td></tr>
    <tr><td class="paramname">Y</td><td>Vertical pixel position. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a243d7583d6e3f99d11a6252195554cac"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a243d7583d6e3f99d11a6252195554cac">&#9670;&nbsp;</a></span>setScrollingRegion()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void FabGL::CanvasClass::setScrollingRegion </td>
          <td>(</td>
          <td class="paramtype">int16_t&#160;</td>
          <td class="paramname"><em>X1</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int16_t&#160;</td>
          <td class="paramname"><em>Y1</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int16_t&#160;</td>
          <td class="paramname"><em>X2</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int16_t&#160;</td>
          <td class="paramname"><em>Y2</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Define the scrolling region. </p>
<p>A scrolling region is the rectangle area where <a class="el" href="class_fab_g_l_1_1_canvas_class.html#a58495dbcb8ff4b7185309e2f06795b39" title="Scroll pixels horizontally and/or vertically. ">CanvasClass.scroll()</a> method can operate.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">X1</td><td>Top left horizontal coordinate. </td></tr>
    <tr><td class="paramname">Y1</td><td>Top left vertical coordiante. </td></tr>
    <tr><td class="paramname">X2</td><td>Bottom right horizontal coordinate. </td></tr>
    <tr><td class="paramname">Y2</td><td>Bottom right vertical coordiante. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="addc92ca7063db1be6c3298d3ba82f649"></a>
<h2 class="memtitle"><span class="permalink"><a href="#addc92ca7063db1be6c3298d3ba82f649">&#9670;&nbsp;</a></span>swapRectangle()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void FabGL::CanvasClass::swapRectangle </td>
          <td>(</td>
          <td class="paramtype">int16_t&#160;</td>
          <td class="paramname"><em>X1</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int16_t&#160;</td>
          <td class="paramname"><em>Y1</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int16_t&#160;</td>
          <td class="paramname"><em>X2</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int16_t&#160;</td>
          <td class="paramname"><em>Y2</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Swap pen and brush colors of the specified rectangle. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">X1</td><td>Top left horizontal coordinate. </td></tr>
    <tr><td class="paramname">Y1</td><td>Top left vertical coordiante. </td></tr>
    <tr><td class="paramname">X2</td><td>Bottom right horizontal coordinate. </td></tr>
    <tr><td class="paramname">Y2</td><td>Bottom right vertical coordiante. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a6ebb36f7b6fd5e9f114d999371838e62"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6ebb36f7b6fd5e9f114d999371838e62">&#9670;&nbsp;</a></span>waitCompletion()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void FabGL::CanvasClass::waitCompletion </td>
          <td>(</td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>waitVSync</em> = <code>true</code></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Wait for drawing queue to become empty. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">waitVSync</td><td>If true drawings are done on vertical retracing (slow), if false drawings are perfomed immediately (fast with flickering). </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li><a class="el" href="canvas_8h_source.html">canvas.h</a></li>
<li>canvas.cpp</li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.14
</small></address>
</body>
</html>
